<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>奔跑的大熊</title>
  <style>
   
    body {
    background: url(./img/bg1.png) repeat-x;
    animation: bgmove 40s linear 1s infinite;
    }

    .bear {
      width: 200px;
      height: 100px;
      overflow: hidden;
      position: absolute;
      animation: move 3s forwards;
      bottom: 50%;
    }

    .bear img {
      animation: bear .8s infinite steps(8) forwards;
    }

    @keyframes bear {
      0% {
        transform: translate(0, 0);
      }

      100% {
        transform: translate(-1600px, 0);
      }
    }

    @keyframes move {
      0% {
        left: 0
      }

      100% {
        transform: translate(-50%, 0);
        left: 50%;
      }
    }

    @keyframes bgmove {
      0% {
        background-position: 0 0;
      }

      100% {
        background-position: -3840px 0;
      }
    }
  </style>
</head>
<body>
  <div class="bear"><img src="./img/bear.png" alt=""></div>
</body>
</html>